<%@ page language="java" contentType="text/html;charset=UTF-8"%>
<%@ include file="/static/include/taglib.jsp"%>
<!DOCTYPE html >
<html>
<head>
 <meta name="viewport" content="width=device-width" />
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />  
 <title>后台管理--模板编辑</title>
 <link href="${ctxStatic}/layui/css/layui.css" rel="stylesheet" />
 <link href="${ctxStatic}/css/kpiuitanchu.css" rel="stylesheet" />
 <script src="${ctxStatic}/js/jquery-1.8.3.min.js?v=2.0" type="text/javascript"></script>
 <script src="${ctxStatic}/layui/layui.all.js"  type="text/javascript"></script>
 
</head>
<body>
 
 <div class="layui-form" style="color:#ffffff;width:95%;margin:0 auto;margin-top:10px">
  <table>
   <tr>
    <td>请选择分组：</td>
    <td>
     <select name="groupid" id="groupid" lay-verify="required" lay-filter="groupid">
           <option value="">请选择</option>
            <c:forEach var="item" items="${lstorg}">
             <option value="${item.orgid}">${item.orgname}</option>
            </c:forEach>
          </select>
    </td>
   </tr>
   
  </table>
 </div>
 
  <div id="datacon" style="margin-top:10px">
     <iframe width="100%" height="100%" id="getdata" name="getdata" src="" style="display: block;border:0;padding:0;margin:0;overflow-x:auto;overflow-y:no " frameborder="no" border="0" marginwidth="0" marginheight="0" allowtransparency="yes"  >  
       </iframe>
     </div>
 
 
 <input type="hidden" id="templateid" value="${templateid }">
 
  <input type="hidden" id="hidgroupid" value="${ustempentity.groupid }">
 <script>
 $("#datacon").height($(window).height()-60);
 
 layui.use('form', function(){
	 var form = layui.form;
	  form.on('select(groupid)', function(data){
		 $("#getdata").attr("src","template_list_alone_edit?templateid="+$("#templateid").val()+"&groupid="+$("#groupid").val());
       })
       
       if($("#templateid").val()>0){
    	   $("#groupid").val($("#hidgroupid").val());
    	   form.render('select');
    	   
    	   $("#getdata").attr("src","template_list_alone_edit?templateid="+$("#templateid").val()+"&groupid="+$("#hidgroupid").val());
       }
       
	 form.render();
  });
 

 </script>
 
</body>
</html>